﻿using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using Kiva7.DataClasses;
using Kiva7.Controls;

namespace Kiva7.Pages
{
    public partial class JournalEntriesControl : BaseUserControl
    {
        public JournalEntriesControl()
        {
            InitializeComponent();
        }

        private void lbxJournalEntries_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            JournalEntry model = lbxJournalEntries.SelectedItem as JournalEntry;
            if (model != null)
            {
                DoNavigate(JournalEntryPage.GetPageUrl(model.Id, model.LoanId));
            }
            lbxJournalEntries.SelectedItem = null;
        }

    }
}
